package org.meteorshower.employee_depart.remote.system_depart_role;

import org.meteorshower.system_depart.entity.Role;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;


/**
 * 系统维护部门(system_depart)Role服务调用接口
 * */
@FeignClient(name = "system-depart",fallbackFactory = RoleClientFallBackFactory.class)
public interface RoleServiceClient {

    @GetMapping("/api/role/all")
    public List<Role> getRoleAll() throws Exception;

    @GetMapping("/api/role/{rid}")
    public Role getRoleById(@PathVariable("rid") Integer id) throws Exception;

    @GetMapping("/api/role/name/{name}")
    public Role getRoleByName(@PathVariable("name") String name) throws Exception;

}
